/* @import url("https://fonts.googleapis.com/css2?fa"); */

/* ===============变量css============= */
:root{
    --header-height:3.5rem;

    /* ==========colors========== */
    --first-color:hsl(230,62%,56%);
    --title-color:hsl(230,70%,16%);
    --text-color:hsl(230,16%,45%);
    --border-color:hsl(230,50%,90%);
    --white-color:hsl(0,0%,100%);
    --body-color:hsl(230,100%,96%);
    --container-color:hsl(230,100%,97%);

    /* ===========font 和排版======== */
    /* .5rem=8px | 1rem=16px */
    --body-font:"Montserrat",sans-serif;
    --second-font:"Montagu Slab",serif;

    --biggest-font-size:2rem;
    --h1-font-size:1.5rem;
    --h2-font-size:1.25rem;
    --h3-font-size:1rem;
    --normal-font-size:.938rem;
    --small-font-size:.813rem;
    --smaller-font-size:.75rem;

    /* =========font weight======= */
    --font-regular:400;
    --font-medium:500;
    --font-semi-bold:600;

    /* ===========z-index======= */
    --z-tooltip:10;
    --z-fixed:100;
}
/* ========响应式排版========= */
@media screen and (min-width:1150px){
    :root{
        --biggest-font-size:3.5rem;
        --h1-font-size:2.25rem;
        --h2-font-size:1.5rem;
        --h3-font-size:1.25rem;
        --normal-font-size:1rem;
        --small-font-size:.875rem;
        --smaller-font-size:.813rem;
    }

}

/*============= base========== */
*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html{
    scroll-behavior: smooth;
}

body,
input,
button{
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
}

body{
    background-color: var(--body-color);
    color: var(--text-color);
    transition: background-color .4s;
}

h1,h2,h3,h4{
    color: var(--title-color);
    font-family: var(--second-font);
    font-weight: var(--font-medium);
}

ul{
    list-style: none;
}

a{
    text-decoration: none;
}

img{
    display: block;
    max-width: 100%;
    height: auto;
}

input,button{
    border: none;
    outline: none;
    
}


/* ===========通用样式========== */
.button{
    display: inline-block;
    background-color: var(--first-color);
    color: var(--white-color);
    font-weight: var(--font-semi-bold);
    padding: 1rem 1.5rem;
    transition: box-shadow .4s;
    cursor: pointer;
}
.button:hover{
    box-shadow: 0 4px 32px hsla(230, 72%, 32%, .4);
}

/* =============Theme主题=========== */
/* ==========黑色主题变量===== */
body.dark-theme{
    --title-color:hsl(230,48%,85%);
    --text-color:hsl(230,16%,70%);
    --border-color:hsl(230,12%,18%);
    --body-color:hsl(230,12%,8%);
    --container-color:hsl(230,12%,12%);
}

/* =========部分黑色主题变量========== */


.dark-theme .shadow-header{
    box-shadow: 0 2px 16px hsla(0,0%,0%,.4);

}
.dark-theme .nav__menu{
    box-shadow: 0 -8px 32px hsla(0,0%,0%,.4);

}

.dark-theme .scrollup{
    box-shadow: 0 2px 8px hsla(0,0%,0%,.4);

}

.dark-theme .search,
.dark-theme .login{
    background-color: hsla(230, 12%, 8%, .6);
}
.dark-theme::-webkit-scrollbar{
    background-color: hsl(230, 16%, 15%);
}
.dark-theme::-webkit-scrollbar-thumb{
    background-color: hsl(230, 16%, 25%);
}
.dark-theme::-webkit-scrollbar-thumb:hover{
    background-color: hsl(230, 16%, 35%);
}
/* ======重用的css class======= */
.container{
    /* max-width: 1220px; */
    margin-inline: 1.5rem;
}

.grid{
    display: grid;
    gap: 1.5rem;
}

.section{
    padding-block: 5rem 1rem;
}

.section__title{
    text-align: center;
    font-size: var(--h1-font-size);
    font-family: var(--second-font);
    margin-bottom: 2rem;
}

.main{
    overflow: hidden;
}

/* =============header and nav============= */
.header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--body-color);
    z-index: var(--z-fixed);
    transition: box-shadow .4s,background-color .4s;
}

.shadow-header{
    box-shadow: 0 2px 16px hsla(0,0%,0%,.1);
}

.nav{
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__menu{
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--container-color);
    box-shadow: 0 -8px 32px hsla(0,0%,0%,.1);
    padding: 1.25rem 4rem;
    transition: background-color .4s;
}

.nav__logo{
    display: inline-flex;
    align-items: center;
    column-gap: .5rem;
    color: var(--first-color);
    font-weight: var(--font-medium);
}

.nav__logo i{
    font-size: 1.25rem;
}

.nav__list{
    display: flex;
    justify-content: space-between;
}

.nav__link{
    color: var(--text-color);
    transition: color .4s;
}
.nav__link span{
    display: none;
}
.nav__link i{
    font-size: 1.25rem;
}
.nav__link:hover{
    color: var(--first-color);
}

.active-link{
    color: var(--first-color);
}

.nav__actions{
    display: flex;
    align-items: center;
    column-gap: 1rem;
}
.nav__actions i{
    font-size: 1.25rem;
    color: var(--title-color);
    cursor: pointer;
    transition: color .4s;
}
.nav__actions i:hover{
    color: var(--first-color);
}


/* =============search================= */
.search{
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-fixed);
    background-color: hsla(230, 12%, 96%, .6);
    backdrop-filter: blur(16px);
    padding: 8rem 1.5rem;
    transition: top .4s;
}
.search__form{
    display: flex;
    align-items: center;
    column-gap: .5rem;
    background-color: var(--container-color);
    border: 2px solid var(--border-color);
    padding-inline: 1rem;
}

.search__icon{
    font-size: 1.25rem;
    color: var(--title-color);
}

.search__input{
    width: 100%;
    padding-block:1rem ;
    background-color: var(--container-color);
    color: var(--text-color);
}
.search__close{
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    color: var(--title-color);
    cursor: pointer;
}

.show-search{
    top: 0;
}

/* =============登录========= */
.login{
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-fixed);
    background-color: hsla(230, 12%, 96%, .6);
    backdrop-filter: blur(16px);
    align-items: center;
    padding: 1.5rem;
    text-align: center;
    transition: top .4s;
}
.login__form{
    background-color: var(--container-color);
    padding: 2rem 1.5rem;
    border: 2px solid var(--border-color);
    row-gap: 1.25rem;

}
.login__title{
    font-size: var(--h2-font-size);
}
.login__group{
    row-gap: 1.25rem;
}
.login__label{
    display: block;
    text-align: initial;
    color: var(--title-color);
    font-weight: var(--font-medium);
    margin-bottom: .25rem;
}
.login__input{
    width: 100%;
    background-color: var(--container-color);
    border: 2px solid var(--border-color);
    padding: 1rem;
    color: var(--text-color);
}

.login__signup,
.login__forget{
    display: block;
    font-size: var(--small-font-size);
}

.login__signup{
    margin-bottom: .5rem; 
}
.login__signup a{
    color: var(--first-color);
    font-weight: var(--font-medium);
}
.login__forget{
    color: var(--first-color);
    margin-bottom: 1.25rem;
}
.login__button{
    width: 100%;

}
.login__close{
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    color: var(--title-color);
    cursor: pointer;
}
.show-login{
    top: 0;
}

/* ==========home============ */
.home__swiper{
    margin: initial;
}

.home__container{
    padding-top: 2rem;
    row-gap: 2.5rem;
}
.home__data{
    text-align: center;
}
.home__title{
    font-size: var(--biggest-font-size);
    margin-bottom: 1rem;
}
.home__description{
    margin-bottom: 2rem;
}

.home__images{
    display: grid;
}

.home__article,
.home__img{
    width: 220px;
    transition: scale .4s;
}
.home__article{
    scale: .8;
}

.swiper-slide-active,
.swiper-slide-duplicate-active{
    scale:1;
}

/* ==========services======== */
.services__container{
    row-gap: 3rem;
}
.services__card{
    text-align: center;
}
.services__card i{
    display: block;
    font-size: 3rem;
    color: var(--first-color);
    margin-bottom: 1rem;
}
.services__title{
    font-size: var(--h3-font-size);
    margin-bottom: .5rem;
}


/* ========featured========== */
.featured__card{
    position: relative;
    text-align: center;
    background-color: var(--container-color);
    padding: 2rem;
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: border .4s,background-color .4s;
}
.featured__img{
    width: 150px;
    margin: 0 auto .75rem;
}
.featured__title{
    font-size: var(--h2-font-size);
    margin-bottom: .5rem;
}
.featured__prices{
    display: flex;
    justify-content: center;
    align-items: center;
    column-gap: .75rem;
    margin-bottom: 1.25rem;
}

.featured__discount{
    color: var(--title-color);
}

.featured__price{
    font-size: var(--small-font-size);
    text-decoration: line-through;
}

.featured__card .button{
    cursor: pointer;
}
.featured__actions{
    display: inline-flex;
    flex-direction: column;
    row-gap: .75rem;
    position: absolute;
    top: 2rem;
    right: -1.5rem;
    transition: right .4s;
}
.featured__actions button{
    background: none;
    font-size: 1.25rem;
    color: var(--first-color);
    cursor: pointer;
}
.featured__card:hover .featured__actions{
    right: 1.5rem;
}

.swiper-button-prev::after,
.swiper-button-next::after{
    content: '';
}
.swiper-button-next,
.swiper-button-prev{
    width: initial;
    height: initial;
    color: var(--first-color);
    padding: .5rem;
    background-color: var(--container-color);
    border: 1px solid var(--border-color);
    font-size: 1.5rem;
    transition: border .4s,background-color .4s;
}


/* =====================discount=========== */
.discount__container{
    row-gap: 3.5rem;
}
.discount__data{
    text-align: center;
}
.discount__title{
    margin-bottom: 1rem;
}
.discount__description{
    margin-bottom: 2rem;
}
.discount__images{
    display: flex;
    justify-content: center;
}
.discount__img-1{
    transform: translateX(1rem) rotate(-10deg);
}
.discount__img-2{
    transform: translateX(-1rem) rotate(10deg);
}

/* ===========new============= */
.new__card{
    display: flex;
    align-items: center;
    column-gap: 2.5rem;
    background-color: var(--container-color);
    padding: 1.5rem 1rem;
    color:var(--text-color);
    border: 1px solid var(--border-color);
    transition: border .4s ,background-color .4s;
}

.new__card:hover{
    border: 2px solid var(--text-color);
}
.new__img{
    width: 100px;
}
.new__title{
    font-size: var(--h2-font-size);
    margin-bottom: .5rem;
}
.new__prices{
    display: flex;
    align-items: center;
    column-gap: .75rem;
    margin-bottom: .75rem;
}
.new__dicount{
    color: var(--title-color);
}
.new__price{
    font-size: var(--small-font-size);
    text-decoration: line-through;
}
.new__stars{
    color: var(--first-color);
}

.new__swiper:nth-child(1){
    margin-bottom: 2rem;
}

/* ===========join========== */
.join__container{
    position: relative;
    padding-block: 3rem;
}

.join__bg{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.join__data{
    position: relative;
}
.join__title{
    color: var(--white-color);
}
.join__form{
    display: grid;
    row-gap: 1rem;
}
.join__input{
    padding: 1.25rem 1rem;
    background-color: var(--body-color);
    color: var(--title-color);
    transition: background-color .4s;
}
.join__input::placeholder{
    color: var(--text-color);
}
.join__button{
    padding-block: 1.25rem;
}


/* ========testimonial=========== */
.testimonial__card{
    text-align: center;
    background-color: var(--container-color);
    padding: 2rem 3rem 2.5rem;
    border: 2px solid var(--border-color);
    transition: border .4s,background-color .4s;
}
.testimonial__img{
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    object-fit:cover;
}
.testimonial__title{
    font-size: var(--h2-font-size);
    margin-bottom: .75rem;
}
.testimonial__description{
    font-size: var(--small-font-size);
    margin-bottom: 1.25rem;
}
.testimonial__stars{
    color: var(--first-color);
}

/* ===============footer========== */
.footer{
    padding-block: 4rem 6rem;

}

.footer__container{
    row-gap: 3rem;
}
.footer__logo{
    display: inline-flex;
    align-items: center;
    column-gap: .5rem;
    color: var(--first-color);
    font-size: var(--h3-font-size);
    font-family: var(--second-font);
    margin-bottom: 1.25rem;
}
.footer__logo i{
    font-size: 1.25rem;
}
.footer__data{
    grid-template-columns: repeat(2,max-content);
    gap: 3rem 2rem;
}

.footer__title{
    font-size: var(--h3-font-size);
    margin-bottom: 1.25rem;
}

.footer__links{
    display: grid;
    row-gap: .5rem;
}
.footer__link{
    color: var(--text-color);
    transition: color .4s;
}
.footer__link:hover{
    color: var(--first-color);
}

.footer__info{
    font-style: normal;
}

.footer__social{
    display: flex;
    column-gap: 1rem;
}
.footer__social-link{
    font-size: 1.25rem;
    color: var(--first-color);
}

.footer__copy{
    display: block;
    margin-top: 5rem;
    text-align: center;
    font-size: var(--small-font-size);
}


/* =====scroll========= */
::-webkit-scrollbar{
    width: .6rem;
    border-radius: .5rem;
    background-color: hsl(230, 16%, 85%);
}

::-webkit-scrollbar-thumb{
    border-radius: .5rem;
    background-color: hsl(230, 16%, 65%);
}

::-webkit-scrollbar-thumb:hover{
    background-color: hsl(230, 16%, 55%);
}


/* ====scrollup===== */
.scrollup{
    position: fixed;
    right: 1rem;
    bottom: -50%;
    background-color: var(--container-color);
    box-shadow: 0 2px 8px hsla(0,0%,0%,.1);
    display: inline-flex;
    padding: 6px;
    font-size: 1.25rem;
    color: var(--title-color);
    z-index: var(--z-tooltip);
    transition: bottom .4s,background-color .4s;
}
.scrollup:hover{
    transform: translateY(-.5rem);
}
.show-scrollup{
    bottom: 6rem;
}

/* ==================breakpoints=========== */

/* =======手机设备的导航=========== */



/* ========small device======= */
@media screen and (max-width:360px) {
    .container{
        margin-inline: 1rem;
    }
    .nav__menu{
        padding-inline: 3rem;
    }

    .discount__img-1,
    .discount__img-2{
        width: 140px;
    }

    .new__card{
        flex-direction: column;
    }
    .new__title{
        margin-top: 1rem;
        text-align: center;
    }

    .testimonial__card{
        padding-inline: 1rem;
    }

    .footer__data{
        grid-template-columns: 1fr;
        row-gap: 2rem;
    }

}

/* ========medium device========= */
@media screen and (min-width:768px){
    
    .nav__menu{
        position: initial;
        width: initial;
        flex: 1;
        background-color: initial;
        box-shadow: initial;
    }
    .nav__link i {
        display: none;
    }
    .nav__link span{
        display: block;
    }

    .home__container{
        grid-template-columns:1fr 1fr;
    }
    .home__data{
        order: 2;
        text-align: left;
    }

    .services__container{
        grid-template-columns: repeat(3,1fr);
    }

    .discount__container{
        grid-template-columns: repeat(2,1fr);
    }
    .discount__data{
        text-align: left;
        order: 2;
    }

    .join__form{
        width: 700px;
        margin: 0 auto;
        grid-template-columns: 1fr 200px;
    }

    .footer__container{
        grid-template-columns: 250px 1fr;
    }
    .footer__data{
        grid-template-columns: repeat(4,1fr);
    }

    .login__form,.search__form{
        width: 600px;
        margin: 0 auto;
    }

}


/* ========large device========== */
@media screen and (min-width:1150px){
    

}



